package cn.rengy.user.controller;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import cn.rengy.lang.ResultEntity;
import cn.rengy.learn.nacos.api.OrderFeignService;


@RestController
@RequestMapping("/user")
public class UserController {

    @Autowired
    OrderFeignService orderFeignService;

    @RequestMapping(value = "/findOrderByUserId/{id}")
    public ResultEntity<?>  findOrderByUserId(@PathVariable("id") Integer id) {
        //feign调用
    	ResultEntity<?> result = orderFeignService.findOrderByUserId(id);
        return result;
    }
    
    
//    @RequestMapping(value = "/save")
//    public R save(@RequestBody OrderVo order){
//        return orderFeignService.save(order);
//    }
    
   
}
